﻿using System;
using System.Collections.Generic;
using Jxym.DBUtility;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Newtonsoft.Json;
using Jxym.Common.JSON;
using System.Data.SqlClient;
using Jxym.wlkc2011.Module.Default.model;
using Newtonsoft.Json.Converters;
namespace Jxym.wlkc2011.Module.Default.server.Policy
{
    public partial class PolicyDetail : System.Web.UI.Page
    {
        MsSqlDal<model.Notice> Bnotice = new MsSqlDal<model.Notice>();
        SqlParameter[] values = new SqlParameter[] { };
        model.Notice notice = new model.Notice();
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack){
                if (Request.Params["id2"] != null) {
                    int id = Convert.ToInt32(Request.Params["id2"]);
                    notice = Bnotice.GetModel("ID=" + id, values);

                    this.lblAddUser.Text = MyGet.GetUserInfoByID(notice.AddUser).Name;//根据用户ID得到真实姓名
                    this.lblAddTime.Text = notice.AddTime.ToString();
                    this.lblContent.Text = notice.ContentText;
                    this.lblTitle.Text = notice.Title;
                    this.lblqwe.Text = MyGet.GetDeptInfoByID(MyGet.GetUserInfoByID(notice.AddUser).DepartmentID).Name;
                }
            }
        }
    }
}